commit 7867f0c34e685177591b8b7a5c6737aa52342fc9
Author: Daniel Kolesa <daniel@octaforge.org>
Date:   Sat Dec 18 01:16:12 2021 +0100

    make innetgr optional; does not exist on musl

diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
index c89dbcf..e56e4fe 100644
--- a/src/polkitbackend/polkitbackendduktapeauthority.c
+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
@@ -1031,20 +1031,14 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
 {
   const char *user;
   const char *netgroup;
-  gboolean is_in_netgroup = FALSE;
 
   user = duk_require_string (cx, 0);
   netgroup = duk_require_string (cx, 1);
 
-  if (innetgr (netgroup,
-               NULL,  /* host */
-               user,
-               NULL)) /* domain */
-    {
-      is_in_netgroup = TRUE;
-    }
+  (void)user;
+  (void)netgroup;
 
-  duk_push_boolean (cx, is_in_netgroup);
+  duk_push_boolean (cx, FALSE);
   return 1;
 }
 
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
index 056d9a8..5cabbbe 100644
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
@@ -2235,6 +2235,7 @@ get_users_in_net_group (PolkitIdentity                    *group,
   ret = NULL;
   name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
 
+#if 0
 #ifdef HAVE_SETNETGRENT_RETURN
   if (setnetgrent (name) == 0)
     {
@@ -2243,6 +2244,7 @@ get_users_in_net_group (PolkitIdentity                    *group,
     }
 #else
   setnetgrent (name);
+#endif
 #endif
 
   for (;;)
@@ -2255,8 +2257,10 @@ get_users_in_net_group (PolkitIdentity                    *group,
       PolkitIdentity *user;
       GError *error = NULL;
 
+#if 0
       if (getnetgrent (&hostname, &username, &domainname) == 0)
         break;
+#endif
 
       /* Skip NULL entries since we never want to make everyone an admin
        * Skip "-" entries which mean "no match ever" in netgroup land */
@@ -2281,7 +2285,9 @@ get_users_in_net_group (PolkitIdentity                    *group,
   ret = g_list_reverse (ret);
 
  out:
+#if 0
   endnetgrent ();
+#endif
   return ret;
 }
 
